{% extends 'dcim/device/components_base.html' %}
{% load helpers %}
{% load i18n %}

{% block bulk_delete_controls %}
    {{ block.super }}
    {% with bulk_disconnect_view=child_model|validated_viewname:"bulk_disconnect" %}
        {% if 'bulk_disconnect' in actions and bulk_disconnect_view %}
            <button type="submit" name="_disconnect"
                    {% formaction %}="{% url bulk_disconnect_view %}?return_url={{ return_url }}"
                    class="btn btn-outline-danger">
                <span class="mdi mdi-ethernet-cable-off" aria-hidden="true"></span> {% trans "Disconnect" %}
            </button>
        {% endif %}
    {% endwith %}
{% endblock bulk_delete_controls %}

{% block bulk_extra_controls %}
    {{ block.super }}
    {% if perms.dcim.add_poweroutlet %}
        <div class="btn-group" role="group">
            <a href="{% url 'dcim:poweroutlet_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_poweroutlets' pk=object.pk %}"
               class="btn btn-primary">
                <i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add Power Outlets" %}
            </a>
        </div>
    {% endif %}
{% endblock bulk_extra_controls %}
